import numpy as np
from PIL import ImageGrab
import matplotlib.pyplot as plt
import cv2

printscreen = np.array(ImageGrab.grab(bbox=(0, 40, 800, 640)))
# load image using cv2....and do processing.
plt.imshow(cv2.cvtColor(printscreen, cv2.COLOR_BGR2RGB))
# as opencv loads in BGR format by default, we want to show it in RGB.
plt.show()
